package Java20250918;

public class code2 {
	public static void main(String[] args) {
		int num = 2;
		int maxNum = 100;
		int count = 0;
		while(num<=maxNum){
			boolean isPrime = true;
			for(int i = 2;i <= Math.sqrt(num);i++){
				if(num % i == 0){
					isPrime = false;
					break;
				}
			}
			if(isPrime){
				count ++;
				System.out.print(num + " ");
				if(count%5 == 0){
					System.out.println();
				}
			}
			num++;
		}
	}
}
/*2 3 5 7 11 
13 17 19 23 29 
31 37 41 43 47 
53 59 61 67 71 
73 79 83 89 97 */